<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script
      src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js"
      integrity="sha256-QvgynZibb2U53SsVu98NggJXYqwRL7tg3FeyfXvPOUY="
      crossorigin="anonymous"
    ></script>
    <title>Document</title>
  </head>
  <style>
    .chart1 {
      height: 800px;
      float: left;
    }
  </style>
  <body>
    <div class="chart1" style="width: 935px"></div>
    <div class="chart2" style="width: 950px"></div>
    <script>
      let dom = document.querySelector(".chart1");
      let dom2 = document.querySelector(".chart2");
      let myChart1 = echarts.init(dom);
      let myChart2 = echarts.init(dom2);
      myChart1.setOption({
        title: {
          text: "柱状图",
        },
        legend: {
          data: [
            "日期",
            "号数",
            {
              name: "天数",
              icon: "image://",
            },
          ],
          left: "center",
          align: "right",
          padding: [3, 4, 5, 6],
          formatter: function (name) {
            return "这是" + name + "记录";
          },
          selectedMode: "multiple",
          selected: {
            日期: false,
            号数: false,
          },
        },
        tooltip: {
          show: true,
        },
        xAxis: {
          data: ["裤子", "袜子", "鞋子", "书包", "日用品", "家居", "电子参评"],
        },
        yAxis: {},
        series: [
          {
            name: "日期",
            data: [120, 200, 150, 80, 70, 110, 130],
            type: "bar",
          },
          {
            name: "号数",
            data: [120, 200, 150, 80, 70, 110, 130],
            type: "bar",
          },
          {
            name: "天数",
            data: [120, 200, 150, 80, 70, 110, 130],
            type: "bar",
          },
        ],
      });
    </script>
  </body>
</html>
